//
// AWS Manager - A free AWS console application demonstrating advanced concepts
// Copyright (C) 2008-2010 Sean O'Dell. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.awsmanager.common;

/**
 *
 * @author sodell
 */
public class SDBServer {

    protected String serverName;
    protected String server;
    protected int serverPort;
    protected String serverProxyHost;
    protected int serverProxyPort;

    public String getServer() {
        return server;
    }

    public void setServer(String server) {
        this.server = server;
    }

    public String getServerName() {
        return serverName;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }

    public int getServerPort() {
        return serverPort;
    }

    public void setServerPort(int serverPort) {
        this.serverPort = serverPort;
    }

    public void setServerPort(String serverPortStr) {
        if (serverPortStr != null) {
            try {
                this.serverPort = Integer.parseInt(serverPortStr);
            } catch (Exception ex) {
                this.serverPort = -1;
            }
        } else {
            this.serverPort = -1;
        }
    }

    public String getServerProxyHost() {
        return serverProxyHost;
    }

    public void setServerProxyHost(String serverProxyHost) {
        this.serverProxyHost = serverProxyHost;
    }

    public int getServerProxyPort() {
        return serverProxyPort;
    }

    public void setServerProxyPort(int serverProxyPort) {
        this.serverProxyPort = serverProxyPort;
    }

    public void setServerProxyPort(String serverProxyPortStr) {

        if (serverProxyPortStr != null) {
            try {
                this.serverProxyPort = Integer.parseInt(serverProxyPortStr);
            } catch (Exception ex) {
                this.serverProxyPort = -1;
            }
        } else {
            this.serverProxyPort = -1;
        }
    }
}
